package com.bua.control;

import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;

public class SingleAlert {

	private AlertDialog singleAlert = null;
	private Context mContext = null;
	private SingleCheckButton refButton = null;

	public SingleAlert(Context context, SingleCheckButton sender) {
		mContext = context;
		refButton = sender;
		singleAlert = new AlertDialog.Builder(mContext)
				.setSingleChoiceItems(refButton.items, refButton.checked,new OnClickListener() {
					
					@Override
					public void onClick(DialogInterface dialog, int which) {
						// TODO Auto-generated method stub
						refButton.checked=which;
						refButton.UpdateTitle();
						singleAlert.dismiss();
					}
				}).setTitle("请选择").create();
		// TODO Auto-generated constructor stub
	}

	public void Show() {
		singleAlert.show();
	}

}
